<template>
	<view class="medicinecard" @click="toPath()">
		<view class="cardcontent second-font">
					<u-row>
						<u-col span="7">
							{{drug.tradeName}}
							<u-icon name="info-circle-fill"></u-icon>
						</u-col>
						<u-col span="1">
							{{drug.dose}}{{drug.doseUnit}}
						</u-col>
						<u-col offset="1" span="3">
							{{drug.price}}元/{{drug.packUnit}}
						</u-col>
					</u-row>
					<u-row>
						<u-col>
							{{drug.factoryName}}
						</u-col>
					</u-row>
		</view>
	</view>
</template>

<script>
	export default {
		props:["drug","index"],
		data() {
			return {
			};
		},
		methods:{
			toPath(){
				uni.redirectTo({
					url:"doctor_dispensing_detail_medicineinfo?drugid="+this.drug.drugId+"&index="+this.index
				}),
				console.log("click")
			}
		},
		created() {
			// console.log(this.drug)
		}
	}
</script>

<style scoped lang="scss">
	.medicinecard{
		color: #d4d4d4;
		width: 100%;
		border: 1px solid;
		background-color: #FFFFFF;
		margin-top: 20rpx;
	}
	.u-row{
		margin: 20rpx 20rpx;
	}
</style>
